<template>
	<view id="tmpl">
		<view class="table-container" style="margin-top: 20px;">
			<view class="table" cellspacing="0" cellpadding="0">
				<view class="tr">
					<view class="th">姓名</view>
					<view class="th">时间</view>
					<view class="th">得分</view>
				</view>
				<view class="tr" v-for="item in list">
					<view class="td">{{item.nickName}}</view>
					<view class="td">{{item.rq}}</view>
					<view class="td">{{item.df}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pageNum: 1,
				pageSize: 12,
				list : []
			}
		},
		onShow() {
			let _this = this;
			let user_info = uni.getStorageSync("user");
			console.log(user_info)
			
			this.$api.bzGetUserKs({
				bzUserName: user_info.userName, // 班组长用户名
				pageNum: _this.pageNum, // 当前页数
				pageSize: _this.pageSize, // 每页数量
				// zyUsername: '', // 组员用户名 
			}).then((res) => {
				console.log('bzGetUserKs',res)
				let _list = res.data.rows;
				// 不是班组长
				if(!res){
					uni.navigateBack({})
				}
				// 班组长
				else{
					this.list = _list
				}
			})
		}
	}
</script>
<style lang="scss">
	page {
		background-color: #fff;
	}
	.table-container {
		margin: 20rpx;
		padding: 0;
		border: solid 1px #e7e7e8;
		border-radius: 8rpx;
		box-shadow: 0 0 2rpx rgba(0, 0, 0, .1);
		.table {
			border-collapse: collapse;
	
			.tr {
				width: 100%;
				border-top: solid 1px #dadada;
				display: flex;
				justify-content: space-between;
	
				&:first-child {
					border: none;
				}
			}
	
			.tr .th,
			.tr .td {
				padding: 0;
				margin: 0;
				text-align: center;
			}
	
			.tr .th {
				background-color: #eff2f7;
				color: #444644;
				font-size: $uni-font-size-base;
				font-weight: normal;
				padding: 10rpx;
				width: 33.3%;
	
				&:first-child {
					text-align: left;
					padding-left: 20rpx;
					// width: calc(100% - 180px);
				}
			}
	
			.tr .td {
				padding: 20rpx;
				font-weight: bold;
				color: #454545;
				width: 33.3%;
	
				&:first-child {
					text-align: left;
					padding-left: 20rpx;
					// width: calc(100% - 180px);
				}
			}
		}
	}
</style>


